<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/finance/djlc/cw_djlc_wlxs_view.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/finance/djlc/cw_djlc_wlxs_view.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'cw_djlc_wlzb_id',
                footer: "Foots",
                cnName: '物料显示表',
                name: 'djlc/cw_djlc_wlxs_view',
                url: "/cw_djlc_wlxs_view/",
                sortName: "CreateDate"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"bomnumber":"","materialnum":"","componentnum":"","description":""});
            const searchFormOptions = ref([[{"title":"整车头物料号","field":"materialnum","type":"like"},{"title":"组件号","field":"componentnum","type":"like"},{"title":"对象描述","field":"description","type":"like"},{"title":"BOM编号","field":"bomnumber"}]]);
            const columns = ref([{field:'bomnumber',title:'BOM编号',type:'string',width:110,align:'left',sort:true},
                       {field:'materialnum',title:'整车头物料号',type:'string',width:170,align:'left'},
                       {field:'componentnum',title:'组件号',type:'string',width:140,align:'left'},
                       {field:'groupnumname',title:'组号名称',type:'string',width:140,align:'left'},
                       {field:'name',title:'名称',type:'string',width:120,align:'left'},
                       {field:'cw_djlc_wlzb_id',title:'物料显示UUID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'MTyp',title:'MTyp',type:'string',width:60,align:'left'},
                       {field:'description',title:'对象描述',type:'string',width:240,align:'left'},
                       {field:'num',title:'数量',type:'decimal',width:60,align:'left'},
                       {field:'pricesource',title:'价格来源',type:'string',width:70,align:'left'},
                       {field:'unitprice',title:'单价',type:'decimal',width:70,align:'left'},
                       {field:'codename',title:'供应商代码',type:'string',width:110,hidden:true,align:'left'},
                       {field:'totalprice',title:'成本',type:'decimal',width:110,hidden:true,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'bomeffectivedatestart',title:'BOM有效起始日期',type:'datetime',width:120,align:'left',sort:true},
                       {field:'bomeffectivedateend',title:'BOM有效截止日期',type:'datetime',width:120,align:'left',sort:true},
                       {field:'priceeffectivedatestart',title:'价格有效开始日期',type:'datetime',width:120,align:'left',sort:true},
                       {field:'priceeffectivedateend',title:'价格有效结束日期',type:'datetime',width:120,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
